package org.springblade.desktop.controller;

import com.dingtalk.api.DefaultDingTalkClient;
import com.dingtalk.api.request.OapiV2UserListRequest;
import com.dingtalk.api.response.OapiV2UserListResponse;

public class Main {
	public static void main(String[] args) {

		try {
			DefaultDingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/v2/user/list");
			OapiV2UserListRequest req = new OapiV2UserListRequest();
			req.setDeptId(441755433L);
			req.setCursor(0L);
			req.setSize(100L);
			OapiV2UserListResponse rsp = client.execute(req, "6c15fc2c04fc3fb9b3fb3c0eeb38da7c");
			System.out.println(rsp.getBody());
		} catch (Exception e) {
			e.printStackTrace();
		}

	}
}
